home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / webmaste / csehtmlp / csehtmlp.exe / {app} / ParserRules / vbs_script_html.xs < prev    next >
Encoding:
Text File  |  2002-04-22  |  5.2 KB  |  155 lines

  1. //Language: VB Script in HTML
  2. //Copyright (c) 1992-2002 Altium Limited             
  3. //All rights reserved.                               
  4. //http://www.dream-com.com                           
  5. //contact@dream-com.com                              
  6.  
  7. // states
  8. State=snormal
  9. State=sstring1
  10. State=sstring2
  11. State=sstring3
  12. State=scomment1
  13. State=scomment2
  14. State=scomment3
  15. State=shtmltag
  16. State=shtmlVBS
  17. // tokens
  18. Token=tnone
  19. Token=tstring
  20. Token=tcomment
  21. Token=tident
  22. Token=tinteger
  23. Token=tfloat
  24. Token=tresword
  25. Token=tassembler
  26. Token=turl
  27. Token=twhitespace
  28. Token=tresword1
  29. //delims
  30. Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/
  31.  
  32. //Common
  33. snormal <                          shtmltag  tresword1
  34. shtmltag [^\>^\'^\"^\0-9^#32^\=][^\>^\'^\"^#32^\=]* shtmltag  tresword1
  35. shtmltag >                         snormal   tresword1
  36.  
  37. //snormal  <[/a-z_A-Z][a-z_A-Z0-9]*  shtmltag  tresword
  38. //shtmltag [a-z_A-Z][a-z_A-Z0-9]*    shtmltag  tident
  39. //shtmltag >                         snormal   tresword
  40.  
  41.  
  42. // numbers
  43. shtmltag [0-9][0-9]*              shtmltag  tinteger
  44. shtmltag \#[0-9A-F]+              shtmltag  tinteger
  45. shtmltag [1-9][0-9]*\.[0-9]*                    shtmltag  tfloat
  46. shtmltag [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmltag   tfloat
  47.  
  48.  
  49. //white space
  50. snormal #32*                      snormal   twhitespace
  51.  
  52.  
  53. //strings
  54. shtmltag   \'                     sstring1   tstring
  55. sstring1   [^\']*                 sstring1   tstring
  56. sstring1   \'                     shtmltag   tstring
  57. sstring1   \'\'                   sstring1   tstring
  58. sstring1   $                      shtmltag   tstring
  59.  
  60. shtmltag    \"                    sstring2   tstring
  61. sstring2   [^\"]*                 sstring2   tstring
  62. sstring2   \"                     shtmltag   tstring
  63. sstring2   \"\"                   sstring2   tstring
  64. sstring2   $                      shtmltag   tstring
  65.  
  66.  
  67. //comments
  68. shtmltag   <\!--                    scomment1 tcomment
  69. scomment1 [^\-]*                   scomment1 tcomment
  70. scomment1  -->                     shtmltag   tcomment
  71.  
  72. // reswords
  73. shtmlVBS 'And'        shtmlVBS tresword
  74. shtmlVBS 'As'         shtmlVBS tresword
  75. shtmlVBS 'Attribute'  shtmlVBS tresword
  76. shtmlVBS 'Base'       shtmlVBS tresword
  77. shtmlVBS 'ByVal'      shtmlVBS tresword
  78. shtmlVBS 'Call'       shtmlVBS tresword
  79. shtmlVBS 'Case'       shtmlVBS tresword
  80. shtmlVBS 'Compare'    shtmlVBS tresword
  81. shtmlVBS 'Const'      shtmlVBS tresword
  82. shtmlVBS 'Date'       shtmlVBS tresword
  83. shtmlVBS 'Declare'    shtmlVBS tresword
  84. shtmlVBS 'Dim'        shtmlVBS tresword
  85. shtmlVBS 'Do'         shtmlVBS tresword
  86. shtmlVBS 'Each'       shtmlVBS tresword
  87. shtmlVBS 'Else'       shtmlVBS tresword
  88. shtmlVBS 'Elseif'     shtmlVBS tresword
  89. shtmlVBS 'Empty'      shtmlVBS tresword
  90. shtmlVBS 'end'        shtmlVBS tresword
  91. shtmlVBS 'Error'      shtmlVBS tresword
  92. shtmlVBS 'Exit'       shtmlVBS tresword
  93. shtmlVBS 'Explicit'   shtmlVBS tresword
  94. shtmlVBS 'False'      shtmlVBS tresword
  95. shtmlVBS 'For'        shtmlVBS tresword
  96. shtmlVBS 'friend'     shtmlVBS tresword
  97. shtmlVBS 'Function'   shtmlVBS tresword
  98. shtmlVBS 'get'        shtmlVBS tresword
  99. shtmlVBS 'If'         shtmlVBS tresword
  100. shtmlVBS 'Is'         shtmlVBS tresword
  101. shtmlVBS 'let'        shtmlVBS tresword
  102. shtmlVBS 'Loop'       shtmlVBS tresword
  103. shtmlVBS 'Mod'        shtmlVBS tresword
  104. shtmlVBS 'Next'       shtmlVBS tresword
  105. shtmlVBS 'Not'        shtmlVBS tresword
  106. shtmlVBS 'Nothing'    shtmlVBS tresword
  107. shtmlVBS 'Null'       shtmlVBS tresword
  108. shtmlVBS 'On'         shtmlVBS tresword
  109. shtmlVBS 'Option'     shtmlVBS tresword
  110. shtmlVBS 'Or'         shtmlVBS tresword
  111. shtmlVBS 'Private'    shtmlVBS tresword
  112. shtmlVBS 'property'   shtmlVBS tresword
  113. shtmlVBS 'Public'     shtmlVBS tresword
  114. shtmlVBS 'ReDim'      shtmlVBS tresword
  115. shtmlVBS 'Select'     shtmlVBS tresword
  116. shtmlVBS 'Set'        shtmlVBS tresword
  117. shtmlVBS 'String'     shtmlVBS tresword
  118. shtmlVBS 'Sub'        shtmlVBS tresword
  119. shtmlVBS 'Then'       shtmlVBS tresword
  120. shtmlVBS 'To'         shtmlVBS tresword
  121. shtmlVBS 'True'       shtmlVBS tresword
  122. shtmlVBS 'Type'       shtmlVBS tresword
  123. shtmlVBS 'Wend'       shtmlVBS tresword
  124. shtmlVBS 'While'      shtmlVBS tresword
  125. shtmlVBS 'With'       shtmlVBS tresword
  126. shtmlVBS 'Xor'        shtmlVBS tresword
  127.  
  128. //idents
  129. shtmlVBS   [a-z_A-Z][a-z_A-Z0-9]*  shtmlVBS   tident
  130.  
  131. // numbers
  132. shtmlVBS [0-9][0-9]*              shtmlVBS  tinteger
  133. shtmlVBS [1-9][0-9]*\.[0-9]*                    shtmlVBS  tfloat
  134. shtmlVBS [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmlVBS   tfloat
  135.  
  136. //strings
  137. shtmlVBS  \"                     sstring3   tstring
  138. sstring3  [^\"]*                 sstring3   tstring
  139. sstring3  \"                     shtmlVBS   tstring
  140. sstring3  \"\"                   sstring3   tstring
  141. sstring3  $                      shtmlVBS   tstring
  142.  
  143. //comments
  144. shtmlVBS   \'                      scomment2  tcomment
  145. scomment2  [#1-#255]*              shtmlVBS   tcomment
  146. scomment2 $                        shtmlVBS   tcomment
  147.  
  148. shtmlVBS   rem[^#33-#255]          scomment3  tcomment
  149. scomment3  [#1-#255]*              shtmlVBS   tcomment
  150. scomment3 $                        shtmlVBS   tcomment
  151.  
  152. //VBS
  153. snormal  <script#32language="vbscript">   shtmlVBS  tresword
  154. shtmlVBS </script>                        snormal   tresword
  155.